/*
  S.M.A.C.K - An operating system kernel
  Copyright (C) 2010,2011 Mattias Holm and Kristian Rietveld
  For licensing and a full list of authors of the kernel, see the files
  COPYING and AUTHORS.
*/

#ifndef KERNEL__SYS_TYPES_H
#define KERNEL__SYS_TYPES_H

#include <stddef.h> // For size_t
#include <stdint.h>

// Warning: Most of these types are not complete. Therefor they are commented
// out. The types listed here must however be defined according to the
// opengroup.

// Uncommented types are deamed complete, and also some of the out-commented
// types are complete if the comment next to the typename say they are included
// from some specific location.

//typedef int blkcnt_t;
//typedef int blksize_t;
//typedef unsigned clock_t;

//typedef unsigned clockid_t;
//typedef unsigned dev_t;
//typedef unsigned fsblkcnt_t;
//typedef unsigned fsfilcnt_t;
//typedef unsigned gid_t;
//typedef unsigned id_t;
//typedef unsigned ino_t;
//typedef unsigned key_t;
//typedef unsigned mode_t;
//typedef unsigned nlink_t;
typedef int32_t off_t;

typedef int pid_t;

//typedef unsigned pthread_attr_t;
//typedef unsigned pthread_barrier_t;
//typedef unsigned pthread_barrierattr_t;
//typedef unsigned pthread_cond_t;
//typedef unsigned pthread_condattr_t;
//typedef unsigned pthread_key_t;
//typedef unsigned pthread_mutex_t;
//typedef unsigned pthread_mutexattr_t;
//typedef unsigned pthread_once_t;
//typedef unsigned pthread_rwlock_t;
//typedef unsigned pthread_rwlockattr_t;
//typedef unsigned pthread_spinlock_t;
//typedef unsigned pthread_t;
//size_t from stddef.h
//typedef int ssize_t;

typedef int32_t suseconds_t; // [-1, 1000000]

typedef uint64_t time_t;

//typedef unsigned timer_t;
//typedef unsigned trace_attr_t;
//typedef unsigned trace_event_id_t;
//typedef unsigned trace_event_set_t;
//typedef unsigned trace_id_t;
//typedef unsigned uid_t;

typedef uint32_t useconds_t; // [0, 1000000]

#endif /* !KERNEL__SYS_TYPES_H */

